#pragma once
#include "EngineBase.h"

static bool EngineBaseInitialized = false;

Engine::Engine()
{
	GraphCfg.WindowWidth  = 800;
	GraphCfg.WindowHeight = 600;
	GraphCfg.ColorDepth   = 32;
}

Engine &Engine::Instance()
{
	static Engine inst;
	return inst;
}

void Engine::EngineInit()
{
	Viewport = SDL_SetVideoMode(
		GraphCfg.WindowWidth, 
		GraphCfg.WindowHeight, 
		GraphCfg.ColorDepth, 
		SDL_SWSURFACE||
		SDL_DOUBLEBUF||
		SDL_SRCCOLORKEY);

	PixForm = Viewport->format;

	SDL_SetColorKey(Viewport, Viewport->flags, SDL_MapRGB(PixForm, 255, 255, 255));
}